<?php
include "conf.php";
$day=$_POST['day']?$_POST['day']:"none";
$daym=date("Y-m-d",time()-24*3600);
$daydf=$_POST['day']?$_POST['day']:$daym;
$file="/".$dir;
$yd=substr($day,0,4);
$md=substr($day,5,2);
$dd=substr($day,8,2);
$path=$pathBase.$day.$file.".txt";
if($day != "none"){
	$filearr=file($path);
	$ifarr=array();
	foreach($filearr as $v){
		$y=substr($v,-20,-16);
		$m=substr($v,-15,-13);
		$d=substr($v,-12,-10);
		if($y==$yd && $m==$md && $d==$dd){
			$ifarr[]=$v;
		}
	}
}else{
	echo "not date ";
}
echo "All with ".$day." create files：<br>";
echo "<pre>";
print_r($ifarr);
echo "</pre>";
?>
<html>
	<head>
		<title>safe</title>
	</head>
	<body>
		<div class="ff">
			<form action="#" method="post">
				<input type="date" id="" name="day" value="<?php echo $daydf?>" />
				<input type="submit" value="提交"/>
			</form>
		</div>
	</body>
</html>